<%@ page import="com.wuming.caiwu.security.SecurityHander" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/3/20
  Time: 18:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>日志管理</title>
    <link rel="stylesheet" href="${allServerPath}static/layui/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${allServerPath}static/layui/css/public.css" media="all"/>
    <!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.css">-->
    <!--<link rel="stylesheet" href="bootstrap-select-master/dist/css/bootstrap-select.css">-->
    <script type="text/javascript" src="${allServerPath}static/layui/layui/layui.js"></script>
</head>
<body style="background-color: #f0f2f5;" class="childrenBody">
<div class="layui-fluid wuli-main">
<div class="layui-row">
        <fieldset class="layui-elem-field layui-field-title">
            <legend>日志管理</legend>
        </fieldset>
</div>
<div class="layui-row">
    <table class="layui-hide" id="test" lay-filter="demo"></table>
</div>
</div>

<script>
    layui.use(['table', 'layer', 'form'], function () {
        var table = layui.table;
        var layer = layui.layer;
        var form = layui.form;
        var $ = layui.$;

        table.on('checkbox(demo)', function (obj) {
            console.log(obj)
        });

        table.render({
            elem: '#test'
            , url: '${allServerPath}web/log/list.htmls?t=<%=System.currentTimeMillis()%>'
            , cols: [[
                {type: 'checkbox'}
                , {field: 'studentName', align: 'center', title: '学员姓名', width: "150"}
                , {field: 'certNo', align: 'center', title: '证件号', width: "180"}
                , {field: 'studentClaimId', align: 'center', title: '对应待理赔', width: "100"}
                , {field: 'memberName', align: 'center', title: '所属账号', width: "180"}
                , {field: 'operation', align: 'center', title: '修改项', width: "200"}
                , {field: 'operationTime', align: 'center', title: '修改时间', width: "180"}
                , {field: 'remarks', align: 'center', title: '备注',width:'950'}
            ]],
            id: 'logContent',
            method: 'get', //如果无需自定义HTTP类型，可不加该参数
            page: true,
            limit: 10,
            where: {
                "memberId": '<%=SecurityHander.getCurrentUserId()%>',
                "claimId":'${claimId}',
            },
            request: {
                pageName: 'pageIndex', //页码的参数名称，默认：page
                limitName: 'pageSize'
            }, //如果无需自定义请求参数，可不加该参数
            response: {
                statusName: 'code' //数据状态的字段名称，默认：code
                , statusCode: 200 //成功的状态码，默认：0
                , msgName: 'message' //状态信息的字段名称，默认：msg
                , countName: 'total' //数据总数的字段名称，默认：count
                , dataName: 'data' //数据列表的字段名称，默认：data
            }, //如果无需自定义数据响应名称，可不加该参数
            done: function (res, curr, count) {
                //如果是异步请求数据方式，res即为你接口返回的信息。
                //如果是直接赋值的方式，res即为：{data: [], count: 99} data为当前页数据、count为数据总长度
                console.log(res);
            },
            text: {
                none: '暂无相关数据' //默认：无数据。注：该属性为 layui 2.2.5 开始新增
            }
        });

    });
</script>
</body>
</html>
